const path=require('path');
const HtmlWebpackPlugin=require('html-webpack-plugin');
const InlineWebpackPlugin=require('./src/inline-webpack-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
module.exports={
	entry: './src/index.js',
	output: {
		path: path.resolve('dist'),
		filename:'bundle.js'
	},
	module:{
		rules: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				include:path.resolve('./src'),
				use: {
					loader: 'babel-loader',
					options: {
						presets: [
							"env","stage-0","react"
						]
					}
				}
			},
			{
				test: /\.css$/,
				use: ['style-loader','css-loader']
			}
		]
	},
	plugins: [
		new HtmlWebpackPlugin({
			template: './src/index.html',
			filename: 'index.html',
			inlineSource: '.(js|css)$'
		})//,
		//new HtmlWebpackInlineSourcePlugin()
		//new InlineWebpackPlugin()
	]
}